package org.lzy.aibg.dao.impl;

import org.lzy.aibg.dao.UserDao;
import org.lzy.aibg.pojo.User;

import java.util.ArrayList;
import java.util.List;

public class UserDaoImpl implements UserDao {
    private List<User> users;
    /**
     * 查询所有用户
     */
    @Override
    public List<User> selectAll(){
        System.out.println("getAll in UserDaoImpl");
        users = new ArrayList<>();
        User u1 = new User(1,"mbh","男",18,"class1");
        User u2 = new User(2,"yuu","女",19,"class2");
        User u3 = new User(3,"tuu","男",20,"class1");
        users.add(u1);
        users.add(u2);
        users.add(u3);
        return users;
    }
}
